package de.tabuma.lib.webservice.wsdl;

import java.lang.reflect.*;
import java.util.*;
import java.util.logging.*;
/**
 *
 * @author alefen
 */
public class ServiceFacade {

    private static final Logger log = Logger.getLogger(ServiceFacade.class.getName());

    public static String getService(String url, Hashtable<String,Class> methodTable) {
        String str = "";
        Enumeration<String> keys = methodTable.keys();
        while(keys.hasMoreElements()) {
            String key = keys.nextElement();
            str += "<service name=\""+key+"Service\">\n";
            str += "<port name=\""+key+"Port\" binding=\"tns:"+key+"Binding\">\n";
            str += "<soap:address location=\""+url+"\"/>";
            str += "</port>";
            str += "</service>\n";
        }
        return str;
    }
}
